home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
LIBRARY
/
CMPLTPAS
/
PULL.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1988-07-14
|
440b
|
18 lines
{<<<< Pull >>>>}
{ From: COMPLETE TURBO PASCAL 5.0 by Jeff Duntemann }
{ Scott, Foresman & Co. 1988 ISBN 0-673-38355-5 }
{ Described in section 16.12 -- Last mod 12/5/87 }
FUNCTION Pull(Low,High : Integer) : Integer;
VAR
I : Integer;
BEGIN
REPEAT { Keep requesting random integers until }
I := Random(High + 1); { one falls between Low and High }
UNTIL I >= Low;
Pull := I
END;